package com.slipper.system.setting.controller;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.slipper.system.setting.bo.SettingBO;
import com.slipper.system.setting.service.SettingService;
import com.slipper.util.ResultUtil;

/**
 * 环境信息表
 */
@RestController
@RequestMapping("/system/setting")
public class SettingController {
    @Resource
    private SettingService settingService;
    
    @PostMapping(value = "/querySetting")
    public String querySetting() {
        return ResultUtil.successResult(settingService.querySetting());
    }

    @PostMapping(value = "/save")
    public String save(@RequestBody SettingBO bo) {
        return ResultUtil.saveResult(settingService.save(bo), bo);
    }
}
